﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ManejoHorarios.aspx.cs" Inherits="TCU.ManejoHorarios" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript">
    $(document).ready(function () {

        $(".timepick").timepicker();

    });
</script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Label ID="notificacionHorario" runat="server" Text="" ForeColor="Red"></asp:Label>
<h1>Manejo de Horarios</h1>
<hr />
<p>Descripcion</p>

    <asp:GridView ID="gvHorarios" runat="server" AutoGenerateColumns="False" 
        AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" CssClass="table" 
        GridLines="None" ShowFooter="True" onrowcommand="gvHorarios_RowCommand" 
        onrowediting="gvHorarios_RowEditing" 
        onrowupdating="gvHorarios_RowUpdating" 
        onrowcancelingedit="gvHorarios_RowCancelingEdit" 
        onrowdeleting="gvHorarios_RowDeleting">
        <Columns>
            <asp:TemplateField HeaderText="HorarioID" SortExpression="HorarioID">
                <EditItemTemplate>
                    <asp:Label ID="lbEditID" runat="server" Text='<%# Bind("HorarioID") %>'></asp:Label>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="lbID" runat="server" Text='<%# Bind("HorarioID") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="NombreHorario" SortExpression="NombreHorario">
                <EditItemTemplate>
                    <asp:TextBox ID="txtEditNombreHorario" runat="server" Text='<%# Bind("NombreHorario") %>'></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="txtNombreHorario" runat="server"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("NombreHorario") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Hora de Inicio" SortExpression="HoraIncio">
                <EditItemTemplate>
                    <asp:TextBox ID="txtEditHoraInicio" runat="server" CssClass="timepick" Text='<%# Bind("HoraInicio") %>'></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="txtHoraInicio" runat="server" CssClass="timepick"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("HoraInicio") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Hora Fin" SortExpression="HoraFin">
                <EditItemTemplate>
                    <asp:TextBox ID="txtEditHoraFin" runat="server" CssClass="timepick" Text='<%# Bind("HoraFin") %>'></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="txtHoraFin" runat="server" CssClass="timepick"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("HoraFin") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Dias de trabajo" SortExpression="dias">
                <EditItemTemplate>
                    <asp:CheckBoxList ID="chklstEditDias" runat="server">
                        <asp:ListItem Value="L">Lunes</asp:ListItem>
                        <asp:ListItem Value="K">Martes</asp:ListItem>
                        <asp:ListItem Value="M">Miercoles</asp:ListItem>
                        <asp:ListItem Value="J">Jueves</asp:ListItem>
                        <asp:ListItem Value="V">Viernes</asp:ListItem>
                        <asp:ListItem Value="S">Sabado</asp:ListItem>
                        <asp:ListItem Value="D">Domingo</asp:ListItem>
                    </asp:CheckBoxList>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:CheckBoxList ID="chklstDias" runat="server">
                        <asp:ListItem Value="L">Lunes</asp:ListItem>
                        <asp:ListItem Value="K">Martes</asp:ListItem>
                        <asp:ListItem Value="M">Miercoles</asp:ListItem>
                        <asp:ListItem Value="J">Jueves</asp:ListItem>
                        <asp:ListItem Value="V">Viernes</asp:ListItem>
                        <asp:ListItem Value="S">Sabado</asp:ListItem>
                        <asp:ListItem Value="D">Domingo</asp:ListItem>
                    </asp:CheckBoxList>
                    <asp:LinkButton ID="lnkbtnAgregar" runat="server" CommandName="Agregar" 
                        CssClass="btn btn-primary">Agregar</asp:LinkButton>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label5" runat="server" Text='<%# Bind("dias") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>


</asp:Content>
